package Ep04_String._0344;

/**
 * @author Jimmy Zhan WORKSTATION
 * @date 2023/3/16 18:25
 * 说明：力扣 0344 反转字符串
 */

public class Mine {
    public void reverseString(char[] s) {
        if (s.length == 1){
            return;
        }
        char temp;
        int left = 0, right = s.length-1;
        while (left < right){
            temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            left++;
            right--;
        }
    }
}
